### Clear space and set constants
rm(list=ls())
K <- 6
MCMC <- 20000
BURN <- 20000
THIN <- 20
VERB <- 1000
SEED <- 12345

### Setup
library(foreign)
library(nomep)

### Read data
load("glp.RData")

### Set variable vectors

nomvars <- c("glp_offc1", "glp_gender", "glp_marital", "ses", "age", "edu", "glp_region")
               
### Fit the gom
print(proc.time())
glp.fit <- gom(glp[,nomvars], NULL, K,
               mcmc=MCMC, burnin=BURN, thin=THIN, verbose=VERB, seed=SEED)
#dic <- DIC.gom(glp.fit)
print(proc.time())

